Storing CDRs Locally on the Device

CDRs generated by the device can be stored locally on the device ( or internal SD card).

You can specify the calls for which you wish to create locally stored CDRs. This is done using Logging Filter rules in the Logging Filters table. For example, you can configure a rule to create locally stored CDRs for traffic belonging only to IP Group #2.

Locally stored CDRs are saved in a comma-separated values file (*.csv), where each CDR is on a dedicated row or line. An example of a CSV file with two CDRs are shown below :

CSV file viewed in Excel:

CSV file viewed in a text editor (Notepad):

The device's CLI provides enhanced support for performing various actions on locally stored CDRs:

To view the CDR column headers corresponding to the CDR data in the CSV file:
SBC CDRs:
(config-system)# cdr
(cdr)# cdr-format show-title local-storage-sbc 
session id,report type,call duration, call end time, call connect time,call start time, call originator, termination reason, call id, srce uri, dest uri
Gateway CDRs:
(config-system)# cdr
(cdr)# cdr-format show-title local-storage-gw
To view stored CDR files:
View all stored CDR files:
# show storage-history
View all stored, unused CDR files:
# show storage-history unused 
To copy stored CDR files to a remote destination:
# copy storage-history cdr-storage-history <filename> to <protocol://destination> 

Where:

filename: name you want to assign the file. Any file extension name can be used, but as the file content is in CSV format, it is recommended to use the .csv file extension.
protocol: protocol over which the file is sent (tftp, http, or https).

For example:

copy storage-history cdr-storage-history my_cdrs.csv to tftp://company.com/cdrs
To delete stored CDR files, see Deleting Locally Stored CDRs.
The SD card provides storage capacity of up to 16 GB.
If the devicerestarts or powers off, locally stored CDRs are deleted.
Locally stored CDRs are applicable only to "CALL_END" CDR Report Types and to SBC signaling and Gateway CDRs.
You can customize the CDR fields for local storage. See Customizing CDRs for SBC Calls for SBC calls. For Gateway calls, see Customizing CDRs for Gateway Calls.
To configure local CDR storage:
1. Open the Logging Filters table (see Configuring Log Filter Rules), and then enable CDR local storage by configuring a log filtering rule with the following settings:
'Filter Type' and 'Value': (as desired)
'Log Destination': Local Storage
'Log Type': CDR
'Mode': Enable
2. Open the Call Detail Record Settings page (Troubleshoot menu > Troubleshoot tab > Call Detail Record folder > Call Detail Record Settings), and then configure the following parameters:
'File Size' [CDRLocalMaxFileSize]: Enter the maximum size (in kilobytes) of the CDR file. When the Current file reaches this size, the device creates a CDR file. However, if the 'Rotation Period' is reached before the file has reached this maximum size, the CDR file is created.
'Number of Files' [CDRLocalMaxNumOfFiles]: Enter the maximum number of CDR files. If this maximum is reached, any new CDR file replaces the oldest CDR file (i.e., FIFO).
'Rotation Period' [CDRLocalInterval]: Enter the periodic duration (in minutes) of how often a CDR file is created from the Current file (even if empty). For example, if configured to 60, a file is created every hour (or before, if the maximum size has been reached).

For a detailed description of each parameter, see Syslog, CDR and Debug Parameters.

If the CDR storage feature is enabled and you later change the maximum number of files (using the [CDRLocalMaxNumOfFiles] parameter) to a lower value (e.g., from 50 to 10), the device stores the remaining files (e.g., 40) in its memory as unused files.